package org.anderground.editor.drawer;

import org.anderground.core.graphics.Point;
import org.anderground.core.model.Transition;
import org.anderground.modules.drawer.BaseDrawer;

/**
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
public abstract class ActiveBaseDrawer extends BaseDrawer implements
		ActiveMetroDrawer {

	@Override
	public final Transition[] searchTransitions(Point point) {
		if (!isReady()) {
			throw new IllegalStateException(
					"drawer is not yet ready to perform this action");
		}
		return searchTransitionsImpl(point);
	}

	protected abstract Transition[] searchTransitionsImpl(Point point);

}
